fix(skills): validate raw portable fields and reject unknown nested target keys - #205
Merged
Conversation
…arget keys Post-merge review findings from #185: run the pinned Agent Skills frontmatter validation on the authored values before Skill IR sanitization so invalid optional fields fail with AB4007-family diagnostics instead of surviving to build, and report AB3006 unknown-field diagnostics for unrecognized keys nested under targets.claude, targets.cursor, and targets.codex (including codex interface, policy, dependencies, and tool entries) instead of silently dropping typos.
🦋 Changeset detectedLatest commit: e991d4b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the two unaddressed Codex post-merge findings on #185:
config/validate.ts:845) — portable skill fields were sanitized before validation, so invalid optional values (e.g.compatibility: false) were silently cleaned and survived to build. The pinned Agent Skills frontmatter validation now runs on the raw authored values first; diagnostic codes (AB4002/AB4003/AB4007) unchanged.skills/parse-ir.ts:146) — unknown nested keys undertargets.codex(and the same gap undertargets.claude/targets.cursor) were silently dropped. All three host targets now emit the existing AB3006 unknown-field diagnostic for unrecognized nested keys, including codexinterface,policy,dependencies, anddependencies.tools[n]entries. Allowlists were cross-checked against every key (both spellings) the parser consumes, so no valid key regresses.Coordination: rebased over #191 (model-digest canonicalization); no overlap with its changes.
Tests
Two regression tests (raw-portable validation in
normalization.test.ts, nested unknown-key rejection across all targets inskill-ir.test.ts), both verified to fail without the src fix. Scoped unit tests (45 passed), roottsc --noEmit, andrslintgreen post-rebase.